package com.kingint.mbg.bas.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 消耗品和布草/易碎品相关表
 * </p>
 *
 * @author wxh
 * @since 2020-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="BasGoods对象", description="消耗品和布草/易碎品相关表")
public class BasGoods implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "父类id")
    @TableField("pid")
    private Integer pid;

    @ApiModelProperty(value = "物品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "类型（1，酒水，2，布草，3，易碎品），三大类下可以建类，三层")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "单位")
    @TableField("unit")
    private String unit;

    @ApiModelProperty(value = "价格")
    @TableField("price")
    private BigDecimal price;

    @ApiModelProperty(value = "前台代码")
    @TableField("front_code")
    private String frontCode;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "备注")
    @TableField("note")
    private String note;

    @ApiModelProperty(value = "对应物品库存")
    @TableField("stock")
    private Integer stock;

    @ApiModelProperty(value = "对应哪个酒店id")
    @TableField("hotel_id")
    private Integer hotelId;

    @ApiModelProperty(value = "判断是否是物品还是分类：0是物品，1是分类")
    @TableField("isgoods")
    private Integer isgoods;


    @ApiModelProperty(value = "状态（0，正常，1，删除）")
    @TableField("status")
    private Integer status;

    @TableField(exist = false)
    private List<BasGoods> goodsList;

    @ApiModelProperty(value = "对应选择的数量")
    @TableField(exist = false)
    private Integer number=1;

    @ApiModelProperty(value = "下级内容")
    @TableField(exist = false)
    private List<BasGoods> children=new ArrayList<>();
}
